#define _CRT_SECURE_NO_WARNINGS 1

int maxOperations(int* nums, int numsSize) {
    int i = 0;
    int count = 0;
    int sum = nums[i] + nums[i + 1];
    i += 2;
    count++;
    for (i = 2; i + 1 < numsSize; i += 2)
    {
        if (nums[i] + nums[i + 1] == sum)
            count++;
        else
            break;
    }
    return count;
}